<?php

class admin_model extends Model
{
	function __construct()
	{
		parent::Model();
	}
	
	function admin_model()
	{
		self::__construct();
	}
	
	function append_log($username,$module,$action){
		$i = array(
			'username' => $username,
			'module' => $module,
			'action' => $action
		);
		$this->db->insert('recent',$i);
	}
	
	function get_themes(){
		$this->db->order_by("active", "desc");
		$this->db->order_by("name", "asc");
		$query = $this->db->get('themes');
		$i = 0;
		foreach ($query->result_array() as $row)
		{
		   $theme[$i]['name'] = $row['name'];
		   $theme[$i]['active'] = $row['active'];
		   $theme[$i]['id'] = $row['id'];
		   $i++;
		}
		return $theme;
	}
}


?>
